#include <iostream>
#include "spdlog/spdlog.h"
#include "thread_pool.h"

void runable() {
    spdlog::info("execute example");
    std::this_thread::sleep_for(std::chrono::milliseconds(200));
}

int getValue(int i) {
    return 10 + i;
}

int main() {
    simpleThread::ThreadPool pool;
    for (int i = 0; i < 10; ++i) {
        pool.execute(runable);
    }

    auto res = pool.submit(getValue, 10);
    std::cout << res.get() << std::endl;
    pool.join();
    return 0;
}